<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            margin: 0;
        }
        div{
            width: 200px;   /*content内容部分的宽*/
            height: 200px;
            background-color: orangered;
            border:darkgreen solid 10px;
            padding: 20px;
            /*padding: 内边距*/
        }
        div.box2{
            margin-top: 20px;
            margin-left: 20px;
            margin-bottom: 20px;
        }
        .box3{
            margin-top:40px
        }
    </style>
</head>
<body>
    <div class="box2">盒子的大小 宽+padding*2+边*2  高+padding*2+边*2</div>
    <div class="box3">盒子2</div>
</body>
</html>